//package com.oauth.oauth.config;
//
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.security.oauth2.provider.token.RemoteTokenServices;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class SecurityConfig {
//
//    @Value("${spring.security.oauth2.resourceserver.opaquetoken.introspection-uri}")
//    private String introspectionUri;
//
//    @Value("${spring.security.oauth2.resourceserver.opaquetoken.client-id}")
//    private String clientId;
//
//    @Value("${spring.security.oauth2.resourceserver.opaquetoken.client-secret}")
//    private String clientSecret;
//
//    @Bean
//    public RemoteTokenServices remoteTokenServices() {
//        final RemoteTokenServices remoteTokenServices = new RemoteTokenServices();
//        remoteTokenServices.setCheckTokenEndpointUrl(introspectionUri); // 使用 introspection URI
//        remoteTokenServices.setClientId(clientId);
//        remoteTokenServices.setClientSecret(clientSecret);
//        return remoteTokenServices;
//    }
//
//
//    // ... other configuration ...
//}